function greet() {
    console.log("hello there")
}

//函数表达式
const speak = function(name = "David", time = "night") {
    console.log(`good ${time}! ${name}`)
}

//greet()
//speak("Mather", "day")
//speak()


let email = "mather@google.com"
let result = email.replace("google", "baidu")
//console.log(result); // mather@baidu.com

//计算圆的面积，输入参数是圆的半径
// const calcArea = function(radius) {
//     return 3.14 * radius ** 2
// }

//箭头函数
const calcArea = (radius) => 3.14 * radius ** 2

const area = calcArea(5)
console.log(area)

